package cn.seventhquestion;

public class Truck extends Car{
    private int payload;

    public Truck(){

    }

    public Truck(int wheels, int weight, int loader, int payload) {
        super(wheels, weight, loader);
        this.payload = payload;
    }

    public int getPayload() {
        return payload;
    }

    public void setPayload(int payload) {
        this.payload = payload;
    }

    public String show(){
        String str=super.show();
        StringBuffer s = new StringBuffer(str);
        s.append("，它还可以载重"+payload+"t");

        return String.valueOf(s);
    }
}
